Conversation
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-969-tarball/aws-agentcore-0.11.0.tgz |
Coverage Report
|
| .command('create') | ||
| .description(COMMAND_DESCRIPTIONS.create) | ||
| .option('--name <name>', 'Project name (start with letter, alphanumeric only, max 23 chars) [non-interactive]') | ||
| .option('--name <name>', 'Resource name [non-interactive]') |
There was a problem hiding this comment.
why remove the description? it is needed
There was a problem hiding this comment.
Updated the description to 'Resource name (agent or harness) [non-interactive]' — the old project-name constraints now live on --project-name.
| /** Handle CLI mode with progress output */ | ||
| async function handleCreateCLI(options: CreateOptions): Promise<void> { | ||
| const cwd = options.outputDir ?? getWorkingDirectory(); | ||
| const projectName = options.projectName ?? options.name!; |
There was a problem hiding this comment.
The name! assertion can technically be undefined when someone passes --no-agent --project-name Foo without --name.
it works right now because the .action() handler patches name before calling this function, but if handleCreateCLI ever gets called from somewhere else it'll break silently. Can we move that backfill logic into handleCreateCLI methoid directly?
There was a problem hiding this comment.
Moved the backfill into the handler function itself — it now derives name and projectName with cross-fallback at the top, and the .action() caller no longer patches opts.name.
Summary
Adds an optional --project-name flag to agentcore create so the project/folder name can be set independently from the resource name supplied by --name.
On main, --name continues to identify the default runtime resource while --project-name controls the generated project name and directory. Existing calls without --project-name keep the prior behavior.
Validation